package com.scx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.scx.dto.BookPageQueryDTO;
import com.scx.entity.Book;
import com.scx.vo.BookVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.Map;

@Mapper
public interface BookMapper extends BaseMapper<Book> {

    /**
     * 图书分页查询
     *
     * @param BookPageQueryDTO
     * @return
     */
    Page<BookVO> pageQuery(BookPageQueryDTO BookPageQueryDTO);

    /**
     * 根据条件统计图书数量
     * @param map
     * @return
     */
    Integer countByMap(Map map);
}
